if (Meteor.isClient) {
    Meteor.startup(function() {
        var lang = window.navigator.userLanguage || window.navigator.language;
        T9n.setLanguage(lang);
    })
}

if (Meteor.isServer) {
    Meteor.startup(function() {
        ServiceConfiguration.configurations.upsert({ service: "weibo" }, {
            $set: {
                clientId: "1292962797",
                loginStyle: "popup",
                secret: "75a730b58f5691de5522789070c319bc"
            }
        });

        // ServiceConfiguration.configurations.remove({
        //     service: "wechat"
        // });
        // ServiceConfiguration.configurations.insert({
        //     service: "wechat",
        //     appId: "wx6359c889dd8be048",
        //     scope: 'basic',
        //     secret: "<your-app-secret>"
        // });

        ServiceConfiguration.configurations.upsert({ service: "wechat" },{
        	$set: {            
	        	appId: "wx6359c889dd8be048",
	            scope: 'basic',
	            secret: "<your-app-secret>"
        	}
        });
    })
}
